{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using TensorFlow backend.\n",
      "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n",
      "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n",
      "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:528: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n",
      "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:529: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n",
      "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:530: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n",
      "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:535: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n"
     ]
    }
   ],
   "source": [
    "import keras\n",
    "from keras.models import *\n",
    "import os\n",
    "import efficientnet.keras as efn \n",
    "from tqdm import tqdm_notebook\n",
    "\n",
    "os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "models = [\n",
    "#         ('../tmp/model_EfficientNet-B5-9.5.14-2.json','../tmp/ckpt-EfficientNet-B5-9.5.14-2-Epoch_063-acc_0.99573-val_acc_0.94769.h5'),\n",
    "#         ('../tmp/model_EfficientNet-B5-9.7.1-01.json','../tmp/ckpt-EfficientNet-B5-9.7.1-01-Epoch_042-acc_0.99454-val_acc_0.95021.h5'),\n",
    "#         ('../tmp/model_EfficientNet-B5-9.7.2-23.json','../tmp/ckpt-EfficientNet-B5-9.7.2-23-Epoch_040-acc_0.99506-val_acc_0.94368.h5'), \n",
    "        ('../tmp/model_EfficientNet-B5-9.9.1-0123.json','../tmp/ckpt-EfficientNet-B5-9.9.1-0123-Epoch_054-acc_0.99536-loss_0.02748.h5')\n",
    "         ]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "91fbd16c87b34bc79d8abdc751852514",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "HBox(children=(IntProgress(value=0, max=1), HTML(value='')))"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Colocations handled automatically by placer.\n",
      "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/function.py:1007: calling Graph.create_op (from tensorflow.python.framework.ops) with compute_shapes is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Shapes are always computed; don't use the compute_shapes as it has no effect.\n",
      "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "for m in tqdm_notebook(models):\n",
    "    with open(m[0], 'r') as f:\n",
    "        model = model_from_json(f.read())\n",
    "        model.load_weights(m[1])\n",
    "        model.save(f'{m[1][:-3]}_compressed.h5')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_001-acc_0.57998-val_acc_0.85802.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_002-acc_0.81764-val_acc_0.89198.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_003-acc_0.86229-val_acc_0.91304.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_004-acc_0.90020-val_acc_0.91542.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_005-acc_0.92137-val_acc_0.91780.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_007-acc_0.94621-val_acc_0.92120.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_009-acc_0.95842-val_acc_0.92289.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_010-acc_0.96534-val_acc_0.92901.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_011-acc_0.96816-val_acc_0.93071.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_012-acc_0.97157-val_acc_0.93274.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_014-acc_0.98062-val_acc_0.93342.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_019-acc_0.99078-val_acc_0.93716.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_021-acc_0.99189-val_acc_0.94022.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.12-0-Epoch_022-acc_0.99249-val_acc_0.94293.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_001-acc_0.56907-val_acc_0.86821.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_002-acc_0.81909-val_acc_0.89606.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_003-acc_0.86801-val_acc_0.91576.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_006-acc_0.93529-val_acc_0.92391.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_007-acc_0.94792-val_acc_0.92493.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_009-acc_0.96030-val_acc_0.92867.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_010-acc_0.97063-val_acc_0.92969.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_011-acc_0.97669-val_acc_0.93444.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_015-acc_0.98497-val_acc_0.93614.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_016-acc_0.98856-val_acc_0.93716.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_019-acc_0.99095-val_acc_0.93818.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_022-acc_0.99232-val_acc_0.93954.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_023-acc_0.99274-val_acc_0.93988.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_024-acc_0.99283-val_acc_0.94158.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_030-acc_0.99385-val_acc_0.94260.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_035-acc_0.99496-val_acc_0.94293.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_048-acc_0.99590-val_acc_0.94327.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_053-acc_0.99769-val_acc_0.94497.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.13-1-Epoch_059-acc_0.99804-val_acc_0.94531.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_001-acc_0.58177-val_acc_0.86175.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_002-acc_0.82285-val_acc_0.90048.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_003-acc_0.86613-val_acc_0.90931.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_004-acc_0.90028-val_acc_0.91780.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_005-acc_0.92274-val_acc_0.92289.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_006-acc_0.93443-val_acc_0.92323.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_007-acc_0.95407-val_acc_0.92765.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_008-acc_0.96662-val_acc_0.93139.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_011-acc_0.98036-val_acc_0.93546.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_014-acc_0.98352-val_acc_0.93818.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_018-acc_0.98719-val_acc_0.93954.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_019-acc_0.98685-val_acc_0.94056.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_027-acc_0.98907-val_acc_0.94124.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_030-acc_0.99069-val_acc_0.94158.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_037-acc_0.99206-val_acc_0.94192.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_056-acc_0.99437-val_acc_0.94327.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_063-acc_0.99573-val_acc_0.94769.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.14-2-Epoch_063-acc_0.99573-val_acc_0.94769_compressed.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_001-acc_0.53402-val_acc_0.76732.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_002-acc_0.75779-val_acc_0.82235.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_003-acc_0.81781-val_acc_0.87432.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_004-acc_0.86417-val_acc_0.88315.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_005-acc_0.88637-val_acc_0.89334.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_006-acc_0.90003-val_acc_0.89606.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_007-acc_0.91070-val_acc_0.90014.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_008-acc_0.91565-val_acc_0.90115.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_010-acc_0.93016-val_acc_0.90217.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_011-acc_0.93460-val_acc_0.90455.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_012-acc_0.94058-val_acc_0.90931.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_013-acc_0.94288-val_acc_0.91236.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_016-acc_0.95757-val_acc_0.91338.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_018-acc_0.96414-val_acc_0.91542.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_019-acc_0.97072-val_acc_0.91984.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_021-acc_0.97729-val_acc_0.92120.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_022-acc_0.98019-val_acc_0.92663.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_026-acc_0.98395-val_acc_0.92697.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_027-acc_0.98660-val_acc_0.92799.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_029-acc_0.98805-val_acc_0.93240.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_035-acc_0.99027-val_acc_0.93444.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_039-acc_0.99163-val_acc_0.93546.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_043-acc_0.99454-val_acc_0.93648.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_045-acc_0.99351-val_acc_0.93750.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_051-acc_0.99471-val_acc_0.93886.h5\r\n",
      "ckpt-EfficientNet-B5-9.5.15-3-Epoch_052-acc_0.99471-val_acc_0.94090.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.1-0-Epoch_001-acc_0.57862-val_acc_0.76461.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_001-acc_0.58067-val_acc_0.84817.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_001-acc_0.69758-val_acc_0.86855.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_002-acc_0.87083-val_acc_0.88927.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_003-acc_0.90524-val_acc_0.89844.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_004-acc_0.93386-val_acc_0.91101.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_005-acc_0.94480-val_acc_0.91372.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_006-acc_0.95506-val_acc_0.91576.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_007-acc_0.96152-val_acc_0.92255.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_011-acc_0.98266-val_acc_0.92425.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_012-acc_0.98759-val_acc_0.92799.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_014-acc_0.98991-val_acc_0.93207.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_018-acc_0.99337-val_acc_0.93308.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_020-acc_0.99297-val_acc_0.93512.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_022-acc_0.99484-val_acc_0.93614.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.10-01-Epoch_027-acc_0.99586-val_acc_0.93784.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.2-1-Epoch_001-acc_0.59013-val_acc_0.82982.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.2-1-Epoch_002-acc_0.79220-val_acc_0.85971.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_001-acc_0.33467-val_acc_0.79552.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_001-acc_0.42650-val_acc_0.84137.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_002-acc_0.68625-val_acc_0.86481.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_002-acc_0.74823-val_acc_0.88077.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_003-acc_0.77751-val_acc_0.90048.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_003-acc_0.81277-val_acc_0.90489.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_004-acc_0.82874-val_acc_0.90761.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_004-acc_0.86109-val_acc_0.90863.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_005-acc_0.86434-val_acc_0.91270.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_005-acc_0.88730-val_acc_0.90999.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_006-acc_0.89294-val_acc_0.92188.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_006-acc_0.90822-val_acc_0.91882.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_007-acc_0.92376-val_acc_0.92018.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_008-acc_0.93622-val_acc_0.92188.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_009-acc_0.93810-val_acc_0.92663.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_009-acc_0.94698-val_acc_0.93444.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_010-acc_0.94980-val_acc_0.92833.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_011-acc_0.96824-val_acc_0.93478.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_012-acc_0.97208-val_acc_0.93580.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_014-acc_0.97020-val_acc_0.93478.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_015-acc_0.97541-val_acc_0.93648.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_018-acc_0.97900-val_acc_0.93784.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_019-acc_0.98233-val_acc_0.93682.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_021-acc_0.98438-val_acc_0.94022.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_024-acc_0.98608-val_acc_0.94192.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.4-3-Epoch_032-acc_0.98591-val_acc_0.93852.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_001-acc_0.51143-val_acc_0.85734.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_002-acc_0.79117-val_acc_0.88859.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_003-acc_0.84624-val_acc_0.91168.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_004-acc_0.88671-val_acc_0.91236.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_005-acc_0.90899-val_acc_0.92154.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_006-acc_0.92666-val_acc_0.92459.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_007-acc_0.94024-val_acc_0.92527.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_008-acc_0.94630-val_acc_0.92595.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_009-acc_0.95006-val_acc_0.92697.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_011-acc_0.96500-val_acc_0.92731.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_012-acc_0.97550-val_acc_0.93784.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_015-acc_0.98292-val_acc_0.94056.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.5-0-Epoch_022-acc_0.98916-val_acc_0.94260.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_001-acc_0.63694-val_acc_0.87806.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_001-acc_0.65049-val_acc_0.86685.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_002-acc_0.84991-val_acc_0.89640.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_002-acc_0.85623-val_acc_0.89640.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_003-acc_0.88893-val_acc_0.91440.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_003-acc_0.89448-val_acc_0.90082.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_004-acc_0.92214-val_acc_0.91644.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_005-acc_0.93127-val_acc_0.91576.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_006-acc_0.94775-val_acc_0.92086.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_006-acc_0.95373-val_acc_0.92425.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_007-acc_0.96645-val_acc_0.92527.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_007-acc_0.96850-val_acc_0.92799.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_008-acc_0.97080-val_acc_0.93105.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_009-acc_0.97405-val_acc_0.93410.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_010-acc_0.97917-val_acc_0.92969.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_011-acc_0.98088-val_acc_0.93003.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_012-acc_0.98489-val_acc_0.93173.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_013-acc_0.98386-val_acc_0.93784.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_019-acc_0.99215-val_acc_0.93274.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_020-acc_0.99069-val_acc_0.93886.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_022-acc_0.99291-val_acc_0.93648.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_023-acc_0.99010-val_acc_0.93920.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_035-acc_0.99496-val_acc_0.93682.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_036-acc_0.99548-val_acc_0.93716.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_037-acc_0.99658-val_acc_0.93886.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_038-acc_0.99565-val_acc_0.93920.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_045-acc_0.99667-val_acc_0.93954.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.6-1-Epoch_046-acc_0.99676-val_acc_0.94327.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_001-acc_0.59396-val_acc_0.87228.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_001-acc_0.60061-val_acc_0.87568.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_002-acc_0.83856-val_acc_0.89130.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_002-acc_0.83856-val_acc_0.89538.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_003-acc_0.88380-val_acc_0.90285.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_003-acc_0.88483-val_acc_0.90693.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_004-acc_0.91155-val_acc_0.90795.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_004-acc_0.91292-val_acc_0.91236.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_005-acc_0.93332-val_acc_0.91338.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_005-acc_0.93460-val_acc_0.92086.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_006-acc_0.94690-val_acc_0.92120.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_008-acc_0.96372-val_acc_0.92188.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_008-acc_0.96397-val_acc_0.93071.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_010-acc_0.97840-val_acc_0.92629.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_011-acc_0.98301-val_acc_0.92935.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_014-acc_0.98685-val_acc_0.93105.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_014-acc_0.98813-val_acc_0.93342.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_017-acc_0.98890-val_acc_0.93376.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_018-acc_0.98924-val_acc_0.93614.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_021-acc_0.99146-val_acc_0.93648.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_022-acc_0.99215-val_acc_0.93682.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.7-2-Epoch_024-acc_0.99300-val_acc_0.93784.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_001-acc_0.56804-val_acc_0.85190.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_002-acc_0.81653-val_acc_0.89062.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_003-acc_0.86588-val_acc_0.90693.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_004-acc_0.89934-val_acc_0.91168.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_005-acc_0.92265-val_acc_0.91712.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_006-acc_0.93674-val_acc_0.91780.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_007-acc_0.94527-val_acc_0.91882.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_008-acc_0.95467-val_acc_0.91950.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_009-acc_0.95765-val_acc_0.93037.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_013-acc_0.98053-val_acc_0.93342.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_014-acc_0.98275-val_acc_0.93512.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_016-acc_0.98608-val_acc_0.93546.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_019-acc_0.99044-val_acc_0.93682.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_022-acc_0.99351-val_acc_0.93784.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_024-acc_0.99377-val_acc_0.93818.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_028-acc_0.99505-val_acc_0.93954.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_029-acc_0.99650-val_acc_0.93988.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_035-acc_0.99752-val_acc_0.94192.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_042-acc_0.99744-val_acc_0.94226.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_048-acc_0.99701-val_acc_0.94293.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.8-0-Epoch_049-acc_0.99710-val_acc_0.94463.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_001-acc_0.57297-val_acc_0.85054.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_002-acc_0.81410-val_acc_0.88451.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_003-acc_0.85950-val_acc_0.89504.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_004-acc_0.89345-val_acc_0.90693.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_005-acc_0.90926-val_acc_0.91610.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_007-acc_0.93930-val_acc_0.92154.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_008-acc_0.94757-val_acc_0.92391.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_010-acc_0.95772-val_acc_0.92799.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_012-acc_0.97263-val_acc_0.92867.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_017-acc_0.98402-val_acc_0.93139.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_024-acc_0.99099-val_acc_0.93444.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_032-acc_0.99343-val_acc_0.93512.h5\r\n",
      "ckpt-EfficientNet-B5-9.6.9-23-Epoch_034-acc_0.99456-val_acc_0.93818.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_001-acc_0.50715-val_acc_0.83173.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_001-acc_0.51073-val_acc_0.83585.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_001-acc_0.51201-val_acc_0.83104.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_002-acc_0.78369-val_acc_0.89389.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_003-acc_0.84255-val_acc_0.91140.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_004-acc_0.88144-val_acc_0.92411.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_006-acc_0.92451-val_acc_0.92651.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_008-acc_0.94695-val_acc_0.93407.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_010-acc_0.95599-val_acc_0.93441.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_011-acc_0.96196-val_acc_0.93716.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_013-acc_0.97706-val_acc_0.93853.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_016-acc_0.98371-val_acc_0.94025.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_020-acc_0.98738-val_acc_0.94196.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_021-acc_0.98763-val_acc_0.94368.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_023-acc_0.98917-val_acc_0.94437.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_027-acc_0.99198-val_acc_0.94540.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_031-acc_0.99429-val_acc_0.94677.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.1-01-Epoch_036-acc_0.99386-val_acc_0.94986.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_001-acc_0.50451-val_acc_0.83997.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_002-acc_0.78265-val_acc_0.88427.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_003-acc_0.84257-val_acc_0.90522.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_004-acc_0.88220-val_acc_0.91003.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_005-acc_0.90590-val_acc_0.91793.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_006-acc_0.92226-val_acc_0.92205.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_007-acc_0.93454-val_acc_0.92514.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_009-acc_0.95380-val_acc_0.92720.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_010-acc_0.95806-val_acc_0.93304.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_013-acc_0.97187-val_acc_0.93613.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_021-acc_0.98866-val_acc_0.93716.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_024-acc_0.98960-val_acc_0.93784.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_025-acc_0.99037-val_acc_0.94299.h5\r\n",
      "ckpt-EfficientNet-B5-9.7.2-23-Epoch_040-acc_0.99506-val_acc_0.94368.h5\r\n",
      "ckpt-EfficientNet-B7-9.6.3-2-Epoch_001-acc_0.57341-val_acc_0.85292.h5\r\n",
      "ckpt-EfficientNet-B7-9.6.3-2-Epoch_002-acc_0.82643-val_acc_0.89130.h5\r\n",
      "ckpt-EfficientNet-B7-9.6.3-2-Epoch_003-acc_0.86536-val_acc_0.90319.h5\r\n",
      "ckpt-EfficientNet-B7-9.6.3-2-Epoch_004-acc_0.89815-val_acc_0.91746.h5\r\n",
      "data_train\r\n",
      "data_train_v10\r\n",
      "data_train_v8\r\n",
      "data_train_v9\r\n",
      "data_valid\r\n",
      "data_valid_v10\r\n",
      "data_valid_v8\r\n",
      "data_valid_v9\r\n",
      "labels_extra.csv\r\n",
      "labels_raw.csv\r\n",
      "labels_raw_v2.csv\r\n",
      "labels_train.csv\r\n",
      "labels_train_v10.csv\r\n",
      "labels_train_v11_fold0.csv\r\n",
      "labels_train_v11_fold1.csv\r\n",
      "labels_train_v11_fold2.csv\r\n",
      "labels_train_v11_fold3.csv\r\n",
      "labels_train_v11_fold4.csv\r\n",
      "labels_train_v8.csv\r\n",
      "labels_train_v9.csv\r\n",
      "labels_valid.csv\r\n",
      "labels_valid_v10.csv\r\n",
      "labels_valid_v11_fold0.csv\r\n",
      "labels_valid_v11_fold1.csv\r\n",
      "labels_valid_v11_fold2.csv\r\n",
      "labels_valid_v11_fold3.csv\r\n",
      "labels_valid_v11_fold4.csv\r\n",
      "labels_valid_v8.csv\r\n",
      "labels_valid_v9.csv\r\n",
      "model_EfficientNet-B5-9.5.12-0.json\r\n",
      "model_EfficientNet-B5-9.5.13-1.json\r\n",
      "model_EfficientNet-B5-9.5.14-2.json\r\n",
      "model_EfficientNet-B5-9.5.15-3.json\r\n",
      "model_EfficientNet-B5-9.6.1-0.json\r\n",
      "model_EfficientNet-B5-9.6.10-01.json\r\n",
      "model_EfficientNet-B5-9.6.2-1.json\r\n",
      "model_EfficientNet-B5-9.6.4-3.json\r\n",
      "model_EfficientNet-B5-9.6.5-0.json\r\n",
      "model_EfficientNet-B5-9.6.6-1.json\r\n",
      "model_EfficientNet-B5-9.6.7-2.json\r\n",
      "model_EfficientNet-B5-9.6.8-0.json\r\n",
      "model_EfficientNet-B5-9.6.9-23.json\r\n",
      "model_EfficientNet-B5-9.7.1-01.json\r\n",
      "model_EfficientNet-B5-9.7.2-23.json\r\n",
      "model_EfficientNet-B7-9.6.3-2.json\r\n",
      "train_data_aug\r\n",
      "training_EfficientNet-B5-9.5.12-0.log\r\n",
      "training_EfficientNet-B5-9.5.13-1.log\r\n",
      "training_EfficientNet-B5-9.5.14-2.log\r\n",
      "training_EfficientNet-B5-9.5.15-3.log\r\n",
      "training_EfficientNet-B5-9.6.1-0.log\r\n",
      "training_EfficientNet-B5-9.6.10-01.log\r\n",
      "training_EfficientNet-B5-9.6.2-1.log\r\n",
      "training_EfficientNet-B5-9.6.4-3.log\r\n",
      "training_EfficientNet-B5-9.6.5-0.log\r\n",
      "training_EfficientNet-B5-9.6.6-1.log\r\n",
      "training_EfficientNet-B5-9.6.7-2.log\r\n",
      "training_EfficientNet-B5-9.6.8-0.log\r\n",
      "training_EfficientNet-B5-9.6.9-23.log\r\n",
      "training_EfficientNet-B5-9.7.1-01.log\r\n",
      "training_EfficientNet-B5-9.7.2-23.log\r\n",
      "training_EfficientNet-B7-9.6.3-2.log\r\n"
     ]
    }
   ],
   "source": [
    "!ls ../tmp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
